#pragma once

#include "Scene.h"
//#include "MainMenuManager.h"
#include "PushButton.h"

#include <boost/signals2/signal.hpp>

/*!
 * \class MainMenu
 * \brief 
 */
class MainMenu : public game_engine::Scene
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
private:
    //MainMenuManager sceneManager;
    game_engine::gui::PushButton *_btnPlay;
    game_engine::gui::PushButton *_btnOptions;
    game_engine::gui::PushButton *_btnExit;
    vector<game_engine::gui::Widget*> _widgets;
    vector<boost::signals2::connection> _btnConnections;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    MainMenu(void);
    virtual ~MainMenu(void);

    // Others
    const BOOL initialize(void);
    const BOOL update(const FLOAT32 time);
    void finalize(void);

    // Getters
    game_engine::gui::PushButton* btnPlay(void) const;
    game_engine::gui::PushButton* btnOptions(void) const;
    game_engine::gui::PushButton* btnExit(void) const;
    const vector<game_engine::gui::Widget*>& widgets(void) const;

    // Slots
    void onPlay(BOOL clicked);
    void onOptions(BOOL clicked);
    void onExit(BOOL clicked);

private:
    void createObjects(void) throw (...);
    void setMenuFocus(game_engine::gui::PushButton *btn);

};
